Skip to content

Enhance video analyzer to detect slide transitions and generate timestamps for videos of slide decks #2

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

Copilot
Copy link

@Copilot Copilot AI commented Jun 23, 2025

This PR implements a new slide deck annotator that detects slide transitions in presentation videos and generates structured timestamps with confidence scores.

New Features

Slide Transition Detection

  • Visual Analysis: Detects significant visual changes that indicate slide transitions
  • Noise Filtering: Ignores minor changes like cursor movement and highlighting
  • Confidence Scoring: Provides 0.0-1.0 confidence scores for each detected transition
  • Timestamp Generation: Outputs precise HH:MM:SS timestamps for transitions

Structured JSON Output

The new annotator generates structured JSON matching the requested format:

{
  "video_duration": "01:23:45",
  "slide_transitions": [
    {
      "timestamp": "00:02:15",
      "confidence": 0.95,
      "slide_number": 1,
      "description": "Title slide to agenda"
    }
  ],
  "recommended_segments": [
    {
      "start": "00:00:00",
      "end": "00:02:00",
      "slide": 1,
      "description": "First 2 minutes of title slide"
    }
  ]
}

Implementation Details

New Files

  • genaisrc/action-video-slide-deck-annotator.genai.mts - Main slide detection script
  • .github/workflows/genai-video-slide-deck-annotator.yml - Workflow for slide analysis
  • entrypoint.sh - Configurable Docker entrypoint

Enhanced Configurability

  • Added script parameter to action.yml for selecting between analyzers
  • Backward compatible - defaults to existing video issue analyzer
  • Enhanced frame analysis with higher detail settings for slide detection

Usage

Use the slide deck annotator by specifying the script parameter:

- uses: pelikhan/action-genai-video-issue-analyzer@v0
  with:
    script: action-video-slide-deck-annotator
    github_token: ${{ secrets.GITHUB_TOKEN }}

Key Benefits

  • Efficient Learning: 2-minute recommended viewing segments for each slide
  • Educational Content: Perfect for analyzing hour+ long knowledge-sharing sessions
  • Computer Vision: Advanced visual analysis to distinguish real transitions from noise
  • Structured Output: Machine-readable JSON format for further processing

The implementation maintains full backward compatibility while adding powerful new slide analysis capabilities.

Fixes #1.

Warning

Firewall rules blocked me from connecting to one or more addresses

I tried to connect to the following addresses, but was blocked by firewall rules:

  • cdn.sheetjs.com
    • Triggering command: npm install (dns block)
    • Triggering command: npm ci (dns block)

If you need me to access, download, or install something from one of these locations, you can either:


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

@Copilot Copilot AI changed the title [WIP] Enhance video analyzer to detect slide transitions and generate timestamps for videos of slide decks Enhance video analyzer to detect slide transitions and generate timestamps for videos of slide decks Jun 23, 2025
@Copilot Copilot AI requested a review from mrjf June 23, 2025 17:07
Copilot finished work on behalf of mrjf June 23, 2025 17:07
"No instructions provided. Please provide instructions to process the video.",
);

const RX = /^https:\/\/github.com\/user-attachments\/assets\/.+$/gim;
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The video may be too big to fit in an issue, so we need to be able to fetch it from git large file storage.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't need to use issues at all for this flow. Take the file location in the repo as the arg.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added Git LFS support to handle large video files. Both video analyzers now detect and properly download videos from Git LFS URLs including raw files, releases, and blob URLs, while maintaining backward compatibility with regular GitHub attachments. Added appropriate error handling and size monitoring for large files. Changes committed in 4f8e8a3.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated the slide deck annotator to accept a direct file path parameter instead of extracting videos from GitHub issues. The script now takes video_file_path as a parameter and processes the video file directly from the repository location, removing the dependency on issues entirely. Changes committed in 6e12cb6.

@Copilot Copilot AI requested a review from mrjf June 23, 2025 17:40
Copilot finished work on behalf of mrjf June 23, 2025 17:40
Copy link
Author

Copilot AI commented Jun 23, 2025

Just as a heads up, I was blocked by some firewall rules while working on your feedback. Expand below for details.

Warning

Firewall rules blocked me from connecting to one or more addresses

I tried to connect to the following addresses, but was blocked by firewall rules:

  • cdn.sheetjs.com
    • Triggering command: npm exec genaiscript scripts compile (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Copilot finished work on behalf of mrjf June 23, 2025 17:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Enhance video analyzer to detect slide transitions and generate timestamps for videos of slide decks
2 participants